# -*- coding: utf-8 -*-
# @Time:2021/04/21 22:37
# @Author:Cindy
from typing import List

import pytest
import yaml


def pytest_collection_modifyitems(session, config, items: List):
    print("这是收集所有测试用例的方法")
    print(items)
    for item in items:
        item.name = item.name.encode('utf-8').decode('unicode-escape')
        item._nodeid = item.nodeid.encode('utf-8').decode('unicode-escape')


def get_datas():
    with open("datas/datas.yaml", encoding="utf-8") as f:
        datas = yaml.safe_load(f)
    return datas
